package horncomb.bpm.task.def.asmt;

import horncomb.bpm.BpmContextHolder;
import horncomb.bpm.task.core.TaskAssignment;
import horncomb.bpm.task.instance.DefaultTaskInstance;

/**
 * @author Daniel
 */
public class CurrUserTaskAssignment implements TaskAssignment {
	/**
	 * {@inheritDoc}
	 */
	public String getActorTerm() {
		return "当前用户(" + BpmContextHolder.getContext().getCurrentActor() + ")";
	}

	/**
	 * {@inheritDoc}
	 */
	public void assign(DefaultTaskInstance taskInst) {
		taskInst.setActor(BpmContextHolder.getContext().getCurrentActor());
	}

}
